Skip to content

Include instrumentation scope#46096

Open
rads-1996 wants to merge 8 commits intoAzure:mainfrom
rads-1996:include-instrumentation-scope
Open

Include instrumentation scope#46096
rads-1996 wants to merge 8 commits intoAzure:mainfrom
rads-1996:include-instrumentation-scope

Conversation

@rads-1996
Copy link
Copy Markdown
Member

@rads-1996 rads-1996 commented Apr 3, 2026

Description

Fixes - #45914. Adds the logger name to Message, Exception and Events telemetry.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@github-actions github-actions bot added the Monitor - Exporter Monitor OpenTelemetry Exporter label Apr 3, 2026
@rads-1996 rads-1996 force-pushed the include-instrumentation-scope branch from 0d4c018 to 398fd3c Compare April 3, 2026 15:15
@rads-1996 rads-1996 marked this pull request as ready for review April 3, 2026 16:49
Copilot AI review requested due to automatic review settings April 3, 2026 16:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds OpenTelemetry InstrumentationScope.name (logger name) into Azure Monitor log telemetry custom dimensions so that Message, Exception, and Event envelopes include source logger information (fixing #45914).

Changes:

  • Populate logger_name in log envelope properties from readable_log_record.instrumentation_scope.name.
  • Update log exporter tests to include assertions for logger_name on Message/Exception scenarios and adjust test instrumentation scope names.
  • Document the new behavior in the package changelog.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/export/logs/_exporter.py Adds instrumentation scope name into log envelope custom properties.
sdk/monitor/azure-monitor-opentelemetry-exporter/tests/logs/test_logs.py Updates fixtures and adds assertions related to exported logger name.
sdk/monitor/azure-monitor-opentelemetry-exporter/CHANGELOG.md Notes the new feature in the unreleased section.

@rads-1996 rads-1996 force-pushed the include-instrumentation-scope branch from 39a91fd to eddf4c4 Compare April 3, 2026 18:47
@rads-1996 rads-1996 force-pushed the include-instrumentation-scope branch from eddf4c4 to 3dc4564 Compare April 3, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Monitor - Exporter Monitor OpenTelemetry Exporter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants